using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace StarTrooper2DGameEngine
{
    public class GameState
    {

        private static GameState instance;

        public static GameState Instance
        {
            get
            {
                if (instance == null)
                    instance = new GameState();

                return instance;
            }
            set
            {
                instance = value;
            }
        }

        //Game management related properties
        public List<Sprite> m_Sprites = new List<Sprite>();
        public List<Sprite> m_ZOrderedSprites = new List<Sprite>();
        public List<Sprite> m_DeletedSprites = new List<Sprite>();
        public List<Sprite> m_AddedSprites = new List<Sprite>();

        public List<Text2D> m_Text2Ds = new List<Text2D>();
        public List<Text2D> m_DeletedText2Ds = new List<Text2D>();
        public List<Text2D> m_AddedText2Ds = new List<Text2D>();

        public int shots;

        public Trooper Trooper;

        public int score;

        public bool ApplicationRestored = false;

        public void NewGame()
        {
            m_Sprites.Clear();
            m_ZOrderedSprites.Clear();
            m_DeletedSprites.Clear();
            m_AddedSprites.Clear();
            m_Text2Ds.Clear();
            m_DeletedText2Ds.Clear();
            m_AddedText2Ds.Clear();
            Trooper = null;
            score = 0;
            shots = 0;
        }
        
        //public static void SaveEmemy()
        //{
        //    EnemyState enemyState = new EnemyState();
        //    enemyState.Position = Vector2.Zero;
        //    enemyState.Health = 10;
        //    EmemyStates.Add(enemyState);
        //}

        //public static void SaveShot()
        //{
        //    ShotState shotState = new ShotState();
        //    shotState.Position = Vector2.Zero;
        //    ShotStates.Add(shotState);
        //}
    }

    public class EnemyState
    {
        public Vector2 Position;
        public int Health;
    }

    public class ShotState
    {
        public Vector2 Position;
    }
}
